__author__ = 'wens'
# -*- coding=utf-8 -*-

import urllib
import urllib2
import cookielib
from HTMLParser import HTMLParser
#=============================================================================
indx=1
cookie = cookielib.CookieJar()
opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
url='http://house.shunde.gov.cn/servlet/list'
values={
    'o':'getJSON','p':str(indx),'template_type':'lpxs_xs_lpld_list'}
data = urllib.urlencode(values)
req = urllib2.Request(url,data)
req.add_header('Host','house.shunde.gov.cn')
req.add_header('Referer','http://house.shunde.gov.cn/')
req.add_header('User-Agent','Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0')
response = opener.open(req)
the_page=response.read()
print the_page